import request from '#/utils/requestAbort';

export async function getHistoryMarketRunDataList(data) {
  if (data.marketId === 'PXBNX') {
    return request(`/market-disclosure/gridKeyIndPointHistoryMonitor/getHistoryMarketRunDataList`, {
      method: 'post',
      data,
    });
  } else {
    return request(`/disclosure/ptdGridKeyIndicatorPointMonitor/getHistoryMarketRunDataList`, {
      method: 'post',
      data,
    });
  }
}

export async function getHistoryMarketSpotPrice(data) {
  if (data.marketId === 'PXBNX') {
    return request(`/market-disclosure/gridKeyIndPointHistoryMonitor/getHistoryMarketSpotPrice`, {
      method: 'post',
      data,
    });
  } else {
    return request(`/disclosure/ptdGridKeyIndicatorPointMonitor/getHistoryMarketSpotPrice`, {
      method: 'post',
      data,
    });
  }
}

export async function getHistoryMarket(data) {
  if (data.marketId === 'PXBNX') {
    return request(`/market-disclosure/gridKeyIndPointHistoryMonitor/getHistoryMarket`, {
      method: 'post',
      data,
    });
  } else {
    return request(`/disclosure/ptdGridKeyIndicatorPointMonitor/getHistoryMarket`, {
      method: 'post',
      data,
    });
  }
}

export async function getLongTermDataDashboard(data) {
  return request(`/disclosure/gansuProvinceSpot/getLongTermDataDashboard`, {
    method: 'post',
    data,
  });
}

export async function getMengxiMarketSupplyDemandLongTermDataForecastData(data) {
  return request(
    `/disclosure/ptdGridKeyIndicatorPointMonitor/getMengxiMarketSupplyDemandLongTermDataForecastData`,
    {
      method: 'post',
      data,
    },
  );
}
